package models

// 结算订单明细 
type CssmOrderDetails struct {
	Id *uint64 `gorm:"column:id;primarykey"` // ID
	Orderno *string `gorm:"column:orderno"` // 订单id
	StartTime *jsontime.JsonTime `gorm:"column:start_time"` // 订单开始充电时间
	GenerateDate *string `gorm:"column:generate_date"` // 账单生成日期
	PayDate *string `gorm:"column:pay_date"` // 支付日期
	BillId *uint64 `gorm:"column:bill_id"` // 结算账单id 已结算订单对应的结算单id
	BillDate *string `gorm:"column:bill_date"` // 结算账单生成日期
	StationId *uint64 `gorm:"column:station_id"` // 充电站id
	TenantId *uint64 `gorm:"column:tenant_id"` // 商户id
	Shopid *uint64 `gorm:"column:shopid"` // 店铺id
	StartSourceCode *uint8 `gorm:"column:start_source_code"` // 订单来源 互联互通
	ChargingDl *float64 `gorm:"column:charging_dl"` // 总电量
	PayTFees *float64 `gorm:"column:pay_t_fees"` // 应收总金额
	PayEFees *float64 `gorm:"column:pay_e_fees"` // 应收电费
	PaySFees *float64 `gorm:"column:pay_s_fees"` // 应收服务费
	SettlementRate *float64 `gorm:"column:settlement_rate"` // 商户结算费率
	TechnicalServiceFeePaid *float64 `gorm:"column:technical_service_fee_paid"` // 已付技术服务费
	MarketingFee *float64 `gorm:"column:marketing_fee"` // 商家承担营销总费用
	EleDiscount *float64 `gorm:"column:ele_discount"` // 电费折扣
	ServDiscount *float64 `gorm:"column:serv_discount"` // 服务费折扣
	OrderStatus *uint8 `gorm:"column:order_status"` // 订单状态 0:未结算 1:已结算
	CreatedTime *jsontime.JsonTime `gorm:"column:created_time"` 
	UpdatedTime *jsontime.JsonTime `gorm:"column:updated_time"` // 更新时间
}
func (entity *CssmOrderDetails) TableName() string {
	return "cssm_order_details"
}